//go:build wireinject
// +build wireinject

package server

import (
	"github.com/cuiyuanxin/airuisi-admin/internal/dao"
	"github.com/cuiyuanxin/airuisi-admin/internal/repository"
	"github.com/cuiyuanxin/airuisi-admin/internal/router"
	"github.com/cuiyuanxin/airuisi-admin/internal/service"
	"github.com/gin-gonic/gin"
	"github.com/google/wire"
)

var SetupSet = wire.NewSet(setupSetting, setupLogger)

var ServerSet = wire.NewSet(router.NewRouter)

var RepositorySet = wire.NewSet(repository.NewDBEngine, repository.NewRepository, dao.New)

var ServiceSet = wire.NewSet(
	service.New,
)

func newApp(string) (*gin.Engine, func(), error) {
	panic(wire.Build(
		SetupSet,
		ServerSet,
		RepositorySet,
		//	ServiceSet,
		//	HandlerSet,
	))
}
